package com.erp.erp_servers.CustomerContact;

import com.erp.erp_entitys.CustomerContact.CustomerContactEntity;
import com.erp.erp_entitys.CustomerContact.CustomerContactExample;
import com.erp.erp_entitys.CustomerContact.CustomerContactVoEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName ICustomerContactService
 * @Description TODO
 * @Author songjizhen
 * @Date 2020-06-29 20:04
 * @Version 1.0
 */
public interface ICustomerContactService {
    long countByExample(CustomerContactExample example);

    int deleteByExample(CustomerContactExample example);
    int deleteByExample(CustomerContactExample example, List<Integer> list) throws Exception;
    int deleteByPrimaryKey(Integer id);

    int insert(CustomerContactEntity record);

    int insertSelective(CustomerContactEntity record) throws Exception;

    List<CustomerContactEntity> selectByExample(CustomerContactExample example);

    List<CustomerContactVoEntity> query(String name, String email, String salesman);
    List<CustomerContactVoEntity> query(String company);
    CustomerContactEntity selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") CustomerContactEntity record, @Param("example") CustomerContactExample example);

    int updateByExample(@Param("record") CustomerContactEntity record, @Param("example") CustomerContactExample example);

    int updateByPrimaryKeySelective(CustomerContactEntity record) throws Exception;

    int updateByPrimaryKey(CustomerContactEntity record);

    /**
     * 根据邮件更新最后联系时间
     * @param email
     * @return
     */
    int updateByEmail(List<String> email);
    List<CustomerContactEntity> selectByDim(String dim);
}
